package main

import "net/http"
// go语言基于多线程模型 测试过程中开启了
/**
Threads:  11 total,   0 running,  11 sleeping,   0 stopped,   0 zombie
%Cpu(s):  1.7 us,  1.7 sy,  0.0 ni, 96.6 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
MiB Mem :  15907.3 total,   1158.4 free,  10486.1 used,   4262.7 buff/cache
MiB Swap:   3072.0 total,   3069.4 free,      2.6 used.   4818.7 avail Mem
*/

// 测试： ab -k -c 100 -n 10000 http://127.0.0.1:8080/
// 吞吐量：112564.44
func main() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request){
w.Write([]byte("hello, world"))
})
http.ListenAndServe(":8080", nil)
}